package com.zr.system.mapper;


import com.zr.system.domain.vo.Region;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: TOTO-AGU
 * @Date: 2023/02/08/09:28
 * @Description:
 */
@Mapper
public interface RegionMapper {
    /**
     * 新增对象
     *
     * @param info
     * @return
     */
    public int addRegion(Region info);

    /**
     * 更新对象
     *
     * @param info
     * @return
     */
    public int updateRegion(Region info);

    /**
     * 删除对象
     *
     * @param code
     * @return
     */
    public int deleteRegionByCode(Long code);

    /**
     * 获取对象
     *
     * @param code
     * @return
     */
    public Region getRegionById(Long code);

    /**
     * 获取行政区划
     *
     * @return
     */
    public List<Region> getAllRegions();

    /**
     * 批量插入行政区划
     *
     * @param listAreas
     * @return
     */
    public boolean batchInsertRegions(List<Region> listAreas);
}
